*** DEC 20 - voting in Zambia only Round 9 data 
*File name: 
****      Use data from Afrobarometer 9(available on afrobarometer.org) and subset to Zambia only

 recode urbrur (2=0), generate(urb)

*Zambia R9  
 bysort youth35: tabulate voted female, chi2 col 

 		bysort youth35:  tabulate voted female, chi2 col 
  		*OLDER Zambians: Dif=7.48 percentage points, Men 76.80 vs. Women 69.32 P=0.033 
		 *YOUNGER Zambians: Dif=5.67  percentage points, Men  85.34  vs. Women  79.67  P=0.091 
  		bysort youth35:  tabulate voted female if urb==1, chi2 col 
	*** NOW LIMIT TO URBAN SAMPLE: 
	* No Difference: Young Men 68.24    vs. Young women  67.65 P=0.910
	
 
 graph hbar  voted if youth35==0, over(female) over(urb) blabel(name, pos(inside) format(%2.0f))  title("Rural vs. Urban Young Zambians' Voting Rates in 2021", span) bar(1, bfcolor(gray))  legend(pos(12) row(1)) legend(off)  ysize(5)   xsize(8)
 
 graph hbar  voted if youth35==0, over(female) over(urb) blabel(name, pos(inside) format(%2.0f))  title("Rural vs. Urban Young Zambians' Voting Rates in 2021", span) bar(1, bfcolor(gray))  legend(pos(12) row(1)) legend(off)  ysize(5)   xsize(8)
	recode q8 (2=1) (8/9=.), gen(discusspolb)
	bysort youth35: tab discusspolb female if urb==1, row chi2
	
	 graph hbar  discusspolb if youth35==0, over(female) over(urb) blabel(name, pos(inside) format(%2.0f))  title("Rural vs. Urban Young Zambians' Voting Rates in 2021", span) bar(1, bfcolor(gray))  legend(pos(12) row(1)) legend(off)  ysize(5)   xsize(8) 
 	 recode q10a   (2/4=1) (8/9=.), gen(wouldmeetingb)
	recode q10a  (2=0) (3/4=1) (8/9=.), gen(didmeetingb)
	 recode q10b   (2/4=1) (8/9=.), gen(wouldjoinb)
	recode q10b  (2=0) (3/4=1) (8/9=.), gen(didjoinb)
	 recode q10c   (2/4=1) (8/9=.), gen(wouldprotestb)
	recode q10c  (2=0) (3/4=1) (8/9=.), gen(didprotestb)
 
*urb: none significant
  	  	bysort youth35:  tabulate didmeetingb female if urb==1, chi2 col 
  		bysort youth35:  tabulate didjoinb female if urb==1, chi2 col 
  		bysort youth35:  tabulate didprotestb female if urb==1, chi2 col 
		bysort youth35:  tabulate wouldmeetingb   female if urb==1, chi2 col 
  		bysort youth35:  tabulate wouldjoinb female if urb==1, chi2 col 
  		bysort youth35:  tabulate wouldprotestb female if urb==1, chi2 col 
		bysort youth35:  tabulate ncs_schoolinfob female if urb==1, chi2 col 
  		bysort youth35:  tabulate ncs_locgovplanb female if urb==1, chi2 col 
  		bysort youth35:  tabulate ncs_locgovcontractsb female if urb==1, chi2 col 
		bysort youth35:  tabulate discusspolb female if urb==1, chi2 col 
		bysort youth35:  tabulate joinb female if urb==1, chi2 col 
		bysort youth35:  tabulate joinb female if urb==1, chi2 col 

 ** rural:
		bysort youth35:  tabulate ncs_schoolinfob female if urb==0, chi2 col 
  		bysort youth35:  tabulate ncs_locgovplanb female if urb==0, chi2 col 
  		bysort youth35:  tabulate ncs_locgovcontractsb female if urb==0, chi2 col 
   		bysort youth35:  tabulate joinb female if urb==0, chi2 col 
 